<?php
/**
 * Created by PhpStorm.
 * User: zhuyujun
 * Date: 2017/10/26
 * Time: 10:52
 */

namespace App\Api\Service\Routes;

use Dingo\Api\Routing\Router;


class OrderRoute
{
    public function map(Router $router)
    {
        $router->group(['namespace' => 'Order\Controllers', 'prefix' => 'order'], function ($router) {
            //订单类型选择
            $setFunction = 'getOrderTypeAll';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //订单类型提交
            $setFunction = 'orderTypeSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //订单创建-基础信息-选项参数获取
            $setFunction = 'orderPreBaseInfo';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //订单创建-基础信息-提交
            $setFunction = 'orderPreBaseSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //订单创建-配送消息提交
            $setFunction = 'orderPreDistributionSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取订单列表
            $setFunction = 'getOrderList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取订单详情
            $setFunction = 'getOrderDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认开工
            $setFunction = 'confirmStart';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认领取材料基础页面
            $setFunction = 'confirmReceiveMaterialBaseInfo';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认领取材料
            $setFunction = 'confirmReceiveMaterial';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //添加材料
            $setFunction = 'addMaterial';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //删除材料
            $setFunction = 'deleteMaterial';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认开工后订单详情页面
            $setFunction = 'afterOrderDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认领取完成
            $setFunction = 'confirmReceiveComplete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认完工基础页面
            $setFunction = 'confirmCompleteBaseInfo';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认完工
            $setFunction = 'confirmComplete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //确认完工后详情页面
            $setFunction = 'completeOrderDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工艺信息获取统一接口
            $setFunction = 'getProcessDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工艺提交统一接口
            $setFunction = 'processSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工艺订单过程添加
            $router->get('addCourse','ProcessController@setCourse');
            $router->post('addCourse','ProcessController@setCourse');

            //管理员订单详情
            $setFunction = 'getManagerOrderDetail';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //管理员订单详情-多工艺列表展示
            $setFunction = 'getManagerOrderDetailList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //订单-再来一单
            $setFunction = 'copyOrder';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //订单-草稿箱-列表
            $router->get('preList','OrderPreController@lists');
            $router->post('preList','OrderPreController@lists');

            //订单-草稿箱-删除
            $router->get('preDel','OrderPreController@delete');
            $router->post('preDel','OrderPreController@delete');

            //订单删除
            $setFunction = 'orderDelete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //下单人分派给工艺管理员-获取分派列表
            $setFunction = 'distributionAction';
            $router->get('/'.$setFunction,'PermissionController@'.$setFunction);
            $router->post('/'.$setFunction,'PermissionController@'.$setFunction);

            //下单人分派给工艺管理员-确认分派
            $setFunction = 'orderConfirmAssignment';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工艺管理员分派给员工-获取分派列表
            $setFunction = 'orderCourseAssignment';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //工艺管理员分派给员工-数据提交
            $setFunction = 'orderCourseAssignmentSubmit';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //分派用户订单详情页面
            $setFunction = 'getOrderDetailAssignment';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //订单工艺详情
            $setFunction = 'getProcessCourseInfoWithList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //查看被分配员工信息页面（厂长查看接单员工详情页面）
            $setFunction = 'getOrderDetailCourseAssignment';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //订单各类型数量接口
            $setFunction = 'getOrderAllTypeNum';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //订单详情新接口-未完工
            $setFunction = 'getOrderDetailNewNoComplete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);


            //订单详情新接口-已完工
            $setFunction = 'getOrderDetailNewComplete';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);


            //下单人订单分配类型(分配工艺管理员、分配员工、直接分派（只有1个员工）)
            $setFunction = 'getOrderManageAssignmentType';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //主订单订单详情-新接口
            $setFunction = 'getManagerOrderDetailListNew';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //获取产品示例图
            $setFunction = 'getOrderProductionCaseDiagram';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);


            //获取省市区数据接口-预留
            $setFunction = 'getCityList';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

            //测试模块
            $setFunction = 'test';
            $router->get('/'.$setFunction,'IndexController@'.$setFunction);
            $router->post('/'.$setFunction,'IndexController@'.$setFunction);

        });
    }

}